<template>
	<view class="wealth-page">
		<!-- 头部搜索框 -->
		<HeaderSearch :title="titleText" :titleImg="titleImgUrl"></HeaderSearch>
		<view class="glod-floor">
			<!-- 资产 -->
			<view class="total-add-wealth">
				<view class="total-add-item">
					<text class="item-first">总资产</text>
					<text class="item-second">0.00</text>
				</view>
				<view class="total-add-item">
					<text class="item-first">最新收益</text>
					<text class="item-second">0.00</text>
				</view>
			</view>
		</view>
		<view class="white-floor">
			<!-- 财富导航图标 -->
			<view class="navigate-icon">
				<view class="first-row">
					<view class="nav-icon" v-for="item in navIconAndText1" :key="item.id">
						<image class="nav-img" :src="item.icon"></image>
						<text class="nav-txt">{{item.title}}</text>
					</view>
				</view>
				<view class="second-row">
					<view class="nav-icon" v-for="item in navIconAndText2" :key="item.id">
						<image class="nav-img" :src="item.icon"></image>
						<text class="nav-txt">{{item.title}}</text>
					</view>
				</view>
			</view>
			<!-- 行情 -->
			<view class="sub-body">
				<view class="sub-title">
					<view class="sub-title-img"></view>
					<text class="sub-title-text">行情</text>
				</view>
				<view class="hangqing-show-and-gifts">
					<view class="hangqing-show">
						<view class="show-item">
							<view class="show-item-title">
								深圳成指
							</view>
							<view class="show-item-num">
								<text class="num">14828.80</text>
								<view class="percent">
									<text class="per1">-41.86</text>
									<text>-0.28%</text>
								</view>
							</view>
						</view>
						<view class="hangqing-gifts">
							
						</view>
					</view>
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import HeaderSearch from "../../components/header-search/header-search.vue";
	export default {
		data() {
			return {
				titleText: "财富",
				titleImgUrl: "../../static/wealth/card-bag.png",
				navIconAndText1: [{
						icon: "../../static/wealth/huoqi.png",
						title: "活期",
						id: "1",
					},
					{
						icon: "../../static/wealth/dingqi.png",
						title: "定期",
						id: "2",
					},
					{
						icon: "../../static/wealth/jijing.png",
						title: "基金",
						id: "3",
					},
					{
						icon: "../../static/wealth/huangjing.png",
						title: "黄金",
						id: "4",
					},
					{
						icon: "../../static/wealth/gupiao.png",
						title: "股票",
						id: "5",
					},
				],
				navIconAndText2: [{
						icon: "../../static/wealth/wenjianjingxuan.png",
						title: "稳健精选",
						id: "6",
					},
					{
						icon: "../../static/wealth/tiantianlicai.png",
						title: "天天利财",
						id: "7",
					},
					{
						icon: "../../static/wealth/jijingtougu.png",
						title: "基金投顾",
						id: "8",
					},
					{
						icon: "../../static/wealth/wodelicai.png",
						title: "我的理财",
						id: "9",
					},
					{
						icon: "../../static/wealth/gaoduanlicai.png",
						title: "高端理财",
						id: "10",
					},
				],
			};
		},
		components: {
			HeaderSearch,
		}
	}
</script>

<style lang="scss" scoped>
	.wealth-page {
		.glod-floor {
			height: 170rpx;
			background-color: #ffe3c0;
			margin-top: -140rpx;
			border-top-left-radius: 50rpx;
			padding: 42rpx 154rpx 0rpx;

			.total-add-wealth {
				display: flex;
				justify-content: space-between;
				align-items: center;

				.total-add-item {
					display: flex;
					flex-direction: column;
					align-items: center;

					.item-first {
						font-size: 24rpx;
						color: #333;
						margin-bottom: 24rpx;
					}

					.item-second {
						font-size: 36rpx;
						font-weight: bold;
						color: #333;
						margin-bottom: 70rpx;
					}
				}
			}
		}

		.white-floor {
			margin-top: -50rpx;
			border-top-left-radius: 50rpx;
			background-color: #fff;
			padding: 40rpx 24rpx 0;

			.navigate-icon {
				.first-row{
					display: flex;
					justify-content: space-between;
					flex-wrap: wrap;
					.nav-icon {
						display: flex;
						flex-direction: column;
						align-items: center;
						margin: 0 20rpx 40rpx;
					
						.nav-img {
							width: 64rpx;
							height: 64rpx;
							margin-bottom: 14rpx;
						}
					
						.nav-txt {
							font-size: 24rpx;
							color: #666;
						}
					}
				}
				
				.second-row{
					display: flex;
					justify-content: space-between;
					flex-wrap: wrap;
					.nav-icon {
						display: flex;
						flex-direction: column;
						align-items: center;
						margin: 0 0rpx 40rpx;
					
						.nav-img {
							width: 64rpx;
							height: 64rpx;
							margin-bottom: 14rpx;
						}
					
						.nav-txt {
							font-size: 24rpx;
							color: #666;
						}
					}
				}
			}
			.sub-body{
				.sub-title{
					display: flex;
					align-items: center;
					margin-bottom: 24rpx;
					.sub-title-img{
						width: 8rpx;
						height: 30rpx;
						margin-right: 10rpx;
						border-radius: 6rpx;
						background-color: #3476f1;
					}
					.sub-title-text{
						font-size: 32rpx;
						font-weight: bold;
					}
				}
				.hangqing-show-and-gifts{
					border-radius: 12rpx;
					box-shadow: 0 0 24rpx rgba(0,0,0,0.1);
					padding: 30rpx 24rpx;
					.hangqing-show{
						.show-item{
							.show-item-title{
								font-size: 28rpx;
								color: #333;
								margin-bottom: 28rpx;
							}
							.show-item-num{
								display: flex;
								flex-direction: column;
								.num{
									font-size: 36rpx;
									color: #f85656;
									font-weight: bold;
									margin-bottom: 10rpx;
								}
								.percent{
									font-size: 24rpx;
									color: #f85656;
									.per1{
										margin-right: 6rpx;
									}
								}
							}
						}
					}
				}
			}
		}
	}
</style>
